<template>
  <div class="flex justify-end margin-top-xs">
    <el-pagination
      :current-page="currentPage"
      :total="total"
      :page-size="pageSize"
      :page-sizes="[10, 20, 40, 80, 100]"
      layout="prev, pager, next, jumper, sizes, total"
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
    ></el-pagination>
  </div>
</template>
<!-- 分页组件 -->
<script>
export default {
  props: ['total', 'currentPage', 'pageSize'],
  methods: {
    handleCurrentChange(val) {
      this.$emit('get-list', val, this.pageSize)
    },
    handleSizeChange(val) {
      this.$emit('get-list', this.currentPage, val)
    }
  }
}
</script>

<style></style>
